home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / haziran / 20 / setup.exe / {app} / plugins / XQ Control Panel Hide 1.xpl < prev    next >
Encoding:
XSetup plugin  |  2001-03-28  |  3.9 KB  |  110 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="9"
  3. "COUNT"="1"
  4. "UIPATH 1"="Appearance\Control Panel\System Icons"
  5. "NAME"="Visible System Icons"
  6. "VERSION"="1.13"
  7. "OSVERSION"="11111"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Display "" applet"
  10. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  11. "DESCRIPTION 2"="Not all of these options will be available on every system.  Availability depends upon the software installed on your system."
  12. "DESCRIPTION 3"="NOTE #1: Hiding the "Internet Control Panel" applet will also hide the "Users" applet on Windows 9x systems."
  13. "DESCRIPTION 4"="NOTE #2: Hiding the "System Properties" applet also hides the "Add/Remove Hardware" applet on Windows 9x/ME systems."
  14. "DESCRIPTION 5"="NOTE #3: Hiding the "Mouse Control" applet also hides the "Keyboard","Fonts" and "Printers" applets on Windows 9x/ME systems."
  15. "AUTHOR"="Xteq Systems"
  16. "CONTACTURL"="http://www.xteq.com"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"=" "
  19. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  20. "COMMENT 3"="See also: MS KB Q207750"
  21.  
  22.  
  23. '******************************************************************
  24. '***                ONLY CHANGE LINES BELOW                    ****
  25. '******************************************************************
  26.  
  27. aryDesc=Array("System Properties","Display Properties","Add/Remove Programs","Internet Control Panel","Network Properties","Game Controllers / Joysticks","Modem","Telephony","Passwords Properties","Time and Date","Regional Options","Email","ODBC","Power Management","Mouse Control","DirectX","Scanner and Camera Properties","Desktop Themes","Accessibility Options","Add/Remove Hardware","Fax","Multimedia / Sounds","Infrared","HSP Modem")
  28. aryCPLs=Array("sysdm.cpl","desk.cpl","appwiz.cpl","Inetcpl.cpl","netcpl.cpl","joy.cpl","modem.cpl","telephon.cpl","password.cpl","timedate.cpl","intl.cpl","mlcfg32.cpl","odbccp32.cpl","powercfg.cpl","main.cpl","directx.cpl","sticpl.cpl","themes.cpl","access.cpl","hdwwiz.cpl","fax.cpl","mmsys.cpl","infrared.cpl","ptctrl.cpl") 
  29.  
  30. '******************************************************************
  31. sPath="HKCU\Control Panel\Don't Load\"
  32. sFile="CONTROL.INI"
  33. sFileSec="Don't Load"
  34.  
  35.  
  36.  
  37. SUB Plugin_Initialize
  38.  for i=0 to UBound(aryCPLs)
  39.      Call ReadIt(i+1,aryCPLs(i),aryDesc(i)) 
  40.  next 
  41. END SUB
  42.  
  43. Sub ReadIt(ItemNumber,VAL,Desc)
  44.   Call SetUIElement(ItemNumber,"Show '" & Desc & "' applet")
  45.  
  46.   If GetWinVer=2 or GetWinVer=4 then
  47.      s=RegReadValue(sPath & VAL)
  48.      if IsEmpty(s)=false then
  49.         Call SetUIElementEx(ItemNumber,false)
  50.      else
  51.         Call SetUIElementEx(ItemNumber,true)
  52.      end if
  53.   else
  54.      s=IniReadValue(sFile,sFileSec,VAL)
  55.      if len(s)>0 then
  56.         Call SetUIElementEx(ItemNumber,false)
  57.      else
  58.         Call SetUIElementEx(ItemNumber,true)
  59.      end if   
  60.   end if
  61.      
  62. End Sub
  63.  
  64. 'Called when the Plugin should validate the Data the user has entered
  65. SUB Plugin_CheckData(ElementIndex)
  66. END SUB
  67.  
  68. 'Called when the Plugin should apply the changes
  69. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  70.  for i=0 to UBound(aryCPLs)
  71.      Call WriteIt(i+1,aryCPLs(i)) 
  72.  next 
  73.  
  74.  Call IndicateSettingChange()
  75. END SUB
  76.  
  77. Sub WriteIt(ITM,VAL)
  78.  b=GetUIElementEx(ITM)
  79.  'b=GetUIElement(-1) 'crash
  80.  if b=true then
  81.     'Display it
  82.  
  83.     if GetWinVer=2 or GetWinVer=4 then  
  84.        s=RegReadValue(sPath & VAL)
  85.        if IsEmpty(s)=false then
  86.           Call RegDeleteValue(sPath & VAL)
  87.        end if
  88.     else
  89.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  90.     end if
  91.  
  92.  else
  93.    'Hide it
  94.    
  95.    if GetWinVer=2 or GetWinVer=4 then
  96.       Call RegWriteValue(sPath & VAL,"1",1) 
  97.    else
  98.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  99.    end if
  100.  
  101.  end if   
  102. End Sub
  103.  
  104.  
  105. 'Called when the Plugin is about to be removed from memory
  106. SUB Plugin_Terminate
  107. END SUB
  108.  
  109.  
  110.